Overview
In this article, I'll explain why version control is essential for Unreal Engine 5 (UE5) projects, the benefits of using version control, and why the UE Git Plugin is a better choice than standard Git. I'll also provide a step-by-step guide on setting up version control in a UE5 project using the UEGitPlugin (Git LFS 2), with more detailed instructions than the official installation guide.
Environment
- Unreal Engine 5.4
- Git 2.44.0
- UEGitPlugin 3.16
- Windows 11 Pro
Why you should use version control with Unreal Engine 5?
Version control is essential for game development, and when working with UE5, having a solid version control system can save you from many headaches. Whether you are a solo developer or part of a team, version control ensures that your work is backed, organized and easily recoverable.
Here is the benefits of using version control in UE5.
- Project Backup and Recovery
Game projects are complex, and losing progress due to accidental deletions, crashes, or file corruption can be devastating. Version control allows you to revert to previous versions of your project, ensuring that you never lose important work.
- Collaboration and Team Workflow
For teams, version control makes collaboration seamless. Multiple developers can work on different features simultaneously without overwriting each other's work. Branching and merging help integrate changes smoothly while maintaining project stability.
- Experimentation Without Risk
Want to try a new gameplay mechanic but afraid it might break your project? With version control, you can create a separate branch, test your idea, and merge it only if it works as intended. This flexibility encourages experimentation and innovation.
- Tracking Changes and Debugging
Version control keeps a history of all changes made to the project. If a bug is introduced, you can easily track when and where it happened by checking previous commits. This makes debugging much easier compared to working without version control.
Why Use the UE Git Plugin Instead of Standard Git?
Better Handling of Binary Files
Unreal Engine projects contain many binary files (.uasset, .umap) that are not easily diffable like text-based source code. Standard Git struggles with large binary files, whereas the UE Git Plugin supports these files with features like file locking (Check Out), similar to Perforce, Plastic SCM, and SVN.
this video (27:55 - 32:47) explains why standard git is ideal for UE projects:
Video: Ari Arnbjörnsson (Housemarque): Lessons Learned from a Year of UE4 AAA Development
My Suggestion of Choosing Version Control Tool
Team Scale | Recommended Version Control Tool |
---|---|
Solo Developer | Git with UE Git Plugin or Standard Git with LFS |
Team (2-5 members) | Git with UE Git Plugin / Plastic SCM / Subversion |
Team (6+ members) | Consider using Perforce (but expensive) |
How to Install and Set up the UE Git Plugin
Follow these steps to install and enable the UE Git plugin in UE5.
The plugin requires compiling from Visual Studio (or Rider), so you must have at least one C++ file in your project
Step 1: Install Git
Ensure you have Git installed on your system. If not, download and install it from git-scm.com.
During installation, make sure Git LFS and Git Credential Manager are checked.
Step 2: Git Authentication
launch git bash.
Configure your GitHub account:
1git config --global user.name "yourUserName" 2git config --global user.email yourEmail
Step 3: Set Up a Git Repository
To set up a Git repository, you may need a Git GUI client such as GitHub Desktop, Fork, or Sourcetree. Alternatively, you can use the command line.
In this example, we'll use Fork. Open Fork and navigate to File -> Init New Repository....
Then, select your project root.
Next, go to GitHub, click the + button in the top right, and select New repository.
Enter a repository name, choose either Public or Private, and click Create repository.
Ensure that HTTPS is selected, then click the copy button to copy the repository URL.
Return to Fork, right-click Remotes -> Add New Remote....
Paste the copied URL into Repository URL, then click Add New Remote.
Step 4: Download UEGitPlugin
Go to Unreal Engine Git Plugin and download the ZIP file.
Install to Project
Unzip the plugin into project/Plugins/Developer
. If the Plugins
or Developer
folder doesn't exist, create them.
After unzipping, you'll see two UEGitPlugin-3.16
folder, keep only one.
So copy the UEGitPlugin-3.16
folder to Developer
folder (Remove duplicated UEGitPlugin-3.16 folder).
Your folder structure should look like this:
Or you can Install it to Engine
Unzip into Engine/Plugins/Developer
folder.
Then rename Engine/Plugins/Developer/GitSourceControl.uplugin
to Engine/Plugins/Developer/GitSourceControl.uplugin.disabled
Step 5: Setup .gitattributes and .gitignore
In your project root folder:
- Create a
.gitattributes
file and copy the content from .gitattributes. - Create a
.gitignore
file and copy the content from .gitignore.
Step 6: Compile the plugin
Open your project .sln
file in Visual Studio or Rider, then build the project.
Step 7: Set Up UE Revision Control
- Open UE5, go to the plugins menu (Edit->Plugins), and enable Git LFS 2.
- Click Revision Control at the bottom right.
- Click Connect to Revision Control...
- Select provider to Git LFS 2
- Make sure Git Path is set to
git.exe
, check Uses Git LFS, and enter your GitHub username (it should match the one displayed under "UserName"). - Click Accept Settings.
Step 8: Plugin Configuration
Edit Config/DefaultEditorPerProjectUserSettings.ini
, paste the content below.
DefaultEditorPerProjectUserSettings.ini1[/Script/UnrealEd.EditorLoadingSavingSettings] 2bSCCAutoAddNewFiles=False 3bAutomaticallyCheckoutOnAssetModification=False 4bPromptForCheckoutOnAssetModification=True 5 6[/Script/UnrealEd.EditorPerProjectUserSettings] 7bAutoloadCheckedOutPackages=True
Done!
Usage
Pull, Push, Commit in UE5
Check File History
Check Out (Lock) File
When you edit and save a file, it will be checked out (red tick).
You can also manually check out files: Right-click → Revision Control → Check Out
Other users cannot modify locked files until you commit & push or revert the changes.
Plugin GitHub Page
For more information, visit the official plugin page. Unreal Engine Git Plugin
Special Thanks
Thanks to @aizen76 (alwei) and @toshiyuki_wada (ぽちお) for introducing me to the plugin.
Also, thanks author of the plugin mastercoms for helping me solve installation issues.
Feel free to leave a comment if you have any questions.
References
- Unreal Engine Git Plugin
- Video: Ari Arnbjörnsson (Housemarque): Lessons Learned from a Year of UE4 AAA Development
- Video: How To Use GitHub With Unreal Engine | Unreal Engine Remote Team Projects Collaboration
- Video: Version Control in Unreal Engine 5 - Git, Github and Gitlab
- Video: Dive into Source Control in Unreal Engine | Webinar
- Video: 【UE5 x Git 入門】ローカルだけでも使えるよ!今日からはじめるバージョン管理【Azure】
- UE 奈良 LT UE5 プロジェクトを Git で管理しよう
- 【UE5】チーム開発における Git の運用例
- 【Git/UE5】Git を用いた Unreal Engine のバージョン管理の始め方
- Unreal Engine の Revision Control (Source Control)で Git を利用する(1)